// Copyright (C) joyinter
// All rights reserved.
// 
// Author : Lu Rong
// Date   : 2005-01-20

#include "stdafx.h"
#include ".\trenchcontainer.h"

IMPLEMENT_DYNAMIC(CJoyTrenchContainer, CJoyWndContainer)

//##ModelId=44C4B5DB016A
CJoyTrenchContainer::CJoyTrenchContainer(void)
{
	m_skinArea  = true;
	m_skinAlign = true;
	m_name		= "trench_container";
	m_align		= AT_None;
	m_backColor.SetValue(0x00000000);

	m_orgArea.SetRectEmpty();
}

//##ModelId=44C4B5DB016C
CJoyTrenchContainer::~CJoyTrenchContainer(void)
{
}

BEGIN_MESSAGE_MAP(CJoyTrenchContainer, CJoyWndContainer)
	ON_WM_SIZE()
END_MESSAGE_MAP()

//##ModelId=44C4B5DB016F
void CJoyTrenchContainer::OnSize(UINT nType, int cx, int cy)
{
	CJoyWndContainer::OnSize(nType, cx, cy);

	// TODO: Add your message handler code here
}

//##ModelId=44C4B5DB0167
void CJoyTrenchContainer::CM_LoadSkin(CJoyXmlElement *pSkinElem)
{
	__super::CM_LoadSkin(pSkinElem);

	m_backColor.SetValue(pSkinElem->ReadIntX("back_color", m_backColor.GetValue()));
	m_orgArea.SetRect(m_area.left, m_area.top, m_area.right, m_area.bottom);
}
